<?php

namespace App\Winged\Common;

use Illuminate\Routing\Router;

class CommonServiceProvider extends \App\Winged\WingedModuleServiceProvider
{

//    protected $serviceName = 'common';

    public function __construct($app)
    {
        parent::__construct($app, 'Common');
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    protected function onRegister()
    {

    }

    /**
     * Boot the service provider.
     *
     * @return void
     */
    protected function onBoot()
    {
        $this->registerViews(__DIR__);
        $this->registerModuleRoutes();
    }

    /**
     * 注册路由
     */
    public function registerModuleRoutes()
    {
        $func = require_once __DIR__ . '/config/routes.php';
        if(is_callable($func)){
            call_user_func($func);
        }
    }

}
